<%@page import="com.wanmait.cookbook.vo.CookbookCollect"%>

<%@page import="java.util.ArrayList"%>

<%@page import="com.wanmait.cookbook.vo.CookbookComment"%>

<%@page import="com.wanmait.cookbook.vo.Userinfo"%>

<%@page import="com.wanmait.cookbook.vo.Step"%>

<%@page import="com.wanmait.cookbook.vo.IngredientsConsumption"%>

<%@page import="java.util.List"%>

<%@page import="com.wanmait.cookbook.vo.Cookbook"%>

<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%
	String path = request.getContextPath();
%>

<!DOCTYPE html>

<!-- saved from url=(0044)https://www.douguo.com/cookbook/1605903.html -->

<html lang="en">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title></title>

<link rel="icon"
	href="https://cp1.douguo.com/static/nweb/images/favicon.ico?v=1912"
	type="image/x-icon">

<link rel="stylesheet"
	href="<%=path%>/static/cookbookShow_files/main.css">

<link rel="stylesheet"
	href="<%=path%>/static/cookbookShow_files/recipe.css">

<script src="<%=path%>/static/cookbookShow_files/hm.js.下载"></script>
<script src="<%=path%>/static/cookbookShow_files/jquery.js.下载"></script>

<script data-ad-client="ca-pub-6608973961595981" async=""
	src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

<script>

    var _hmt = _hmt || [];

    (function() {

      var hm = document.createElement("script");

      hm.src = "https://hm.baidu.com/hm.js?f4fa5d56f272ae0a0777feec2184a97f";

      var s = document.getElementsByTagName("script")[0];

      s.parentNode.insertBefore(hm, s);

    })();

    </script>

<style>
.one-pan-tip {
	cursor: pointer;
}

.one-pan-tip::before {
	background-position: center;
	background-size: 100% 100%;
	background-repeat: no-repeat;
	box-sizing: border-box;
	width: 1em;
	height: 1em;
	margin: 0 1px .15em 1px;
	vertical-align: middle;
	display: inline-block;
}

.one-pan-tip-success::before {
	content: '';
	background-image:
		url( 4dCCrmwASQyaevBfjrgS/ZBoWkZ364wkyfVRXtG56ZbGHIfwEwKDsm3wrQVUEkFB0ffFsxp3/U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k6j2IYEUZt5ARFJQoNX8iAokRAfAnGfi3epoea/f6/Z+5NeZAjgFidp8gXiEQVsI9GaAzySilV4CVn90w4TB+DmI87N95bxfr2i9jNvMViQE0CjJ2n6E4/LrKMFngrEaoDOYaRWIV4FpFRGfxozTiZAA4yiDjoH4KICjEEfVgF4QhIOrJU4YJfWCI0+AIGbzkfpFVgCRYsnHZGIB+AhuJ5iOBdAJLPkYYywAH8HtBNOxADqBJR9j/H88XIrb/RiE0gAAAABJRU5ErkJggg==)
}

.one-pan-tip-error {
	text-decoration: line-through;
}

.one-pan-tip-error::before {
	content: '';
	background-image:
		url()
}

.one-pan-tip-other::before {
	content: '';
	background-image:
		url()
}

.one-pan-tip-lock::before {
	content: '';
	background-image:
		url()
}
</style>

<meta name="ljjc::status" content="on">

</head>



<%!//递归  方法  显示评论的所有的子评论

	public void showComment(CookbookComment comment, JspWriter out, String path) throws Exception

	{

		out.println(
				"<li class='clearfix' onclick='comments.addReply(&#39;&#39;, &#39;u87840589817494&#39;, &#39;19716159&#39;, &#39;8298117&#39;,0)'>");

		//显示parent	

		String name = "";

		if (comment.getParent() != null)

		{

			name = comment.getParent().getUserinfo().getName();

		}

		//	out.println(comment.getUserinfo().getName()+"回复"+name+"说:"+comment.getContent());

		out.println(
				"<a class='author-img' href='https://www.douguo.com/u/u87840589817494.html' target_='blank' one-link-mark='yes'>");

		out.println("<img src=" + path + "/static/image/" + comment.getUserinfo().getAvatar() + " alt=''>");

		out.println("</a>");

		out.println("<div class='author-comment'>");

		out.println(
				"<a class='nickname' href='https://www.douguo.com/u/u87840589817494.html' target_='blank' one-link-mark='yes'>"
						+ comment.getUserinfo().getName() + "回复" + name + "说:" + "</a>");

		out.println("<p class='commtxt'>" + comment.getContent() + "</p>");
		out.println("<input type='button' class='reply-bt' id='jubao1' data-id='"+comment.getId()+"' value='举报'  >");
		out.println("<p class='time'>" + comment.getInputTime() + "</p>");

		out.println("<a class='reply-btn no-btn' href='#a1'  UID=" + comment.getId() + ">回复</a>");

		out.println("</div>");

		out.println("</li>");

		if (comment.getParent() != null)

		{

			//	out.println("</li>");

			//	out.println("<li class='clearfix' onclick='comments.addReply(&#39;&#39;, &#39;u87840589817494&#39;, &#39;19716159&#39;, &#39;8298117&#39;,0)'>");

		}

		//显示parent的children

		ArrayList<CookbookComment> children = comment.getChildren();//获得parent的子评论

		out.println("<ul id='comments'>");

		for (CookbookComment child : children)

		{

			this.showComment(child, out, path);

		}

		out.println("</ul>");

		out.println("</li>");

	}%>

<body>

	<%
		Cookbook cookbook = (Cookbook) request.getAttribute("cookbook");

	List<IngredientsConsumption> ingredientsConsumptions = (List<IngredientsConsumption>) request
			.getAttribute("ingredientsConsumptions");

	List<Step> steps = (List<Step>) request.getAttribute("steps");

	Userinfo userinfo = (Userinfo) request.getSession().getAttribute("userinfo");

	// 评论

	ArrayList<CookbookComment> firstComments = (ArrayList<CookbookComment>) request.getAttribute("firstComments");

	// 收藏

	int collectCount = (int) request.getAttribute("collectCount");
	%>

	<jsp:include page="/inc/head.jsp"></jsp:include>

	<script>

    //var time=Date.parse(new Date());

    $.ajax({

        url: "/login/user?time="+new Date().getTime(),

        data:"",

        success:function(res) {

            var headhtml="";

            if(res.data.user.user_id){//登录

                var user=res.data.user;

                // 发布弹窗

                headhtml+='<div class="pubt" onmouseover="javascript:$(\'.pubt-box\').show();" onmouseout="javascript:$(\'.pubt-box\').hide();"> <a class="btn-pubt" href="javascript:void(0);">发布</a> <div class="pubt-box br8"> <span class="arwwj"> </span> <a href="/upfood.html">发布菜谱</a> <a href="/caidan/create">创建菜单</a>';

                if(user.is_create_article){

                    headhtml+='<a href="/uparticle.html">发布长笔记</a>';

                }

                if(user.is_create_video){

                    headhtml+='<a href="/video/upvideo">发布视频</a>';

                }

                headhtml+="  </div> </div>";

                //头像

               /*  headhtml+='<div class="myinfo relative" onmouseover="javascript:$(\'.myedit\').show();" onmouseout="javascript:$(\'.myedit\').hide();"> <a class="headicon" href="/u/'+user.username+'.html"> <img class="wb100 br50" src="'+user.headicon+'" alt=""> <span class="msgnum"></span> </a> <div class="myedit br8"> <span class="arwwj"> </span> <a class="relative" href="/message/remind/1" target="_blank">消息提醒 <span class="boll"></span> </a> <a href="/u/'+user.username+'/collect">我的收藏</a> <a href="/draft/recipe">草稿箱</a> <a href="/user/profile" target="_blank">账号设置</a> <a href="/logout?v=1540878216">退出</a> </div> </div>'; */

            }else{//未登录

                headhtml+='<div class="pubt" onmouseover="javascript:$(\'.pubt-box\').show();" onmouseout="javascript:$(\'.pubt-box\').hide();"> <a class="btn-pubt" href="javascript:void(0);">发布</a> <div class="pubt-box br8"> <span class="arwwj"> </span> <a href="/upfood.html">发布菜谱</a> <a href="/caidan/create">创建菜单</a> </div> </div> <div class="perinfo"> <a class="login" href="/login"> 登录 </a> | <a class="register" href="/signup.html" target="_blank"> 注册 </a></div>';

            }

            $("#header .header").append(headhtml);

        }

    });

</script>

	<style>
#banner .care-txt {
	color: #fff;
	background-color: #FFB31A;
	border-radius: 5px;
	display: inline-block;
	width: 646px;
	text-align: center;
	height: 32px;
	line-height: 32px;
	position: absolute;
	bottom: 16px;
	left: 22px;
}

#banner .care-icon {
	width: 15px;
	vertical-align: middle;
	position: relative;
	top: -1px;
}
</style>

	<div id="content" class="recipe-content clearfix">

		<div id="left">

			<!-- 封面图 -->



			<!-- 菜谱名称，昵称，关注 -->

			<div class="relative">

				<div id="banner" class="cboxElement cboxElement1" data-origin="#"
					data-snum="1" href="javascript:void(0);" rel="recipe_img">

					<a
						href="javascript:void(0)"
						one-link-mark="yes"> <img class="wb100"
						src="<%=path%>/static/image/<%=cookbook.getPic()%>"
						alt="<%=cookbook.getTitle()%>">

					</a>

				</div>



			</div>

			<div class="rinfo relative">

				<h1 class="title text-lips" style="display: inline-block"><%=cookbook.getTitle()%></h1>

				<div class="boutiExclu">

					<span class="bouti">精品</span>

				</div>


				<div class="vcnum relative">

					<script type="text/javascript">
				$(function(){
					$.ajax({
						url:"<%=path%>/CookbookServlet",
						data:{action:"addPageviews",cookbookId:<%=cookbook.getId()%>},
						success:function(){}
					});
				});
				</script>

					<span><%=cookbook.getPageviews()%></span> 浏览 <span class="collectnum"><%=collectCount%>万</span>
					收藏
					<div class="absolute operate">

						<a class="btn-collect" href="javascript:void(0);" data-status="0"
							onclick="  collect(this,1605903,&#39;FAqpjArl5JYj1eTsrElqLThGKtRE78kKwZBlAKl2&#39;);  "
							one-link-mark="yes">收藏</a>



					</div>

				</div>

				<div class="clearfix aut-info relative">

					<div class="clearfix left">

						<a class="author-img left"
							href="<%=path%>/PersonalServlet?action=init&id=<%=cookbook.getUserinfo().getId()%>"
							target="_blank" title="<%=cookbook.getUserinfo().getName()%>"
							one-link-mark="yes"> <img class="br50"
							src="<%=path%>/static/image/<%=cookbook.getUserinfo().getAvatar()%>"
							alt="<%=cookbook.getUserinfo().getName()%>" width="30"
							height="30">

						</a>



						<div class="author-info left">

							<a class="nickname text-lips" href="<%%>" target="_blank"
								one-link-mark="yes"><%=cookbook.getUserinfo().getName()%></a> <a
								class="proicon" style="position: relative; top: 1px;"
								href="https://www.douguo.com/user/prodesc" target="_blank"
								one-link-mark="yes"> <%-- <img class="proimg" src="<%=path%>/static/image/<%=cookbook.getUserinfo().getAvatar() %>" alt="<%=cookbook.getUserinfo().getName()%>"> --%>

							</a>

						</div>

						<a class="gz" data-action="add" href="javascript:void(0)"
							onclick=" guanzhu(this,&#39;5778090&#39;,&#39;FAqpjArl5JYj1eTsrElqLThGKtRE78kKwZBlAKl2&#39;,0)  "
							one-link-mark="yes"><span class="addicon">＋</span> 关注</a>

					</div>

				</div>

				<p class="intro">

					<%=cookbook.getInfo()%>

				</p>

				<!-- 个人中心可编辑 -->

			</div>

			<!-- 材料 -->

			<div class="metarial">

				<h2 class="mini-title"><%=cookbook.getTitle()%>的用料
				</h2>

				<table width="690" border="0" cellspacing="0" cellpadding="0"
					class="retamr br8">

					<tbody>

						<%
							for (int i = 0; i < ingredientsConsumptions.size(); i++) {
						%>

						<tr>

							<td class="lirre" style="border-top: 0;"><span
								class="scname"><a href="javascript:void(0)"
									target="_blank" one-link-mark="yes"><%=ingredientsConsumptions.get(i).getIngredientsName()%></a></span>
								<span class="right scnum"><%=ingredientsConsumptions.get(i).getDosage()%></span></td>

							<%
								if (i + 1 < ingredientsConsumptions.size()) {
							%>

							<td style="border-top: 0;"><span class="scname"><a
									href="javascript:void(0)" target="_blank" one-link-mark="yes"><%=ingredientsConsumptions.get(i + 1).getIngredientsName()%></a></span>
								<span class="right scnum"><%=ingredientsConsumptions.get(i + 1).getDosage()%></span></td>

							<%
								}

							else {
							%>

							<td></td>

							<%
								}
							%>

						</tr>

						<%
							i++;

						}
						%>

					</tbody>
				</table>

			</div>

			<!-- 步骤 -->

			<div class="step">

				<h2 class="mini-title"><%=cookbook.getTitle()%>的做法
				</h2>

				<%
					for (int i = 0; i < steps.size(); i++) {
				%>



				<div class="stepcont clearfix">

					<a class="cboxElement cboxElement<%=i + 1%>" data-snum="<%=i + 1%>"
						rel="recipe_img"
						href="https://cp1.douguo.com/upload/caiku/d/b/d/yuan_db454f83ec6f66ea004d133875c6448d.jpg"
						data-origin="https://cp1.douguo.com/upload/caiku/d/b/d/yuan_db454f83ec6f66ea004d133875c6448d.jpg"
						one-link-mark="yes"> <img class="br8"
						src="<%=path%>/static/image/<%=steps.get(i).getPic()%>"
						alt="肉末豆腐#每一道菜都是一台时光机#的做法图解1" width="200" height="200">

					</a>

					<div class="stepinfo">

						<p>
							步骤<%=i + 1%></p>

						<%=steps.get(i).getInfo()%>

					</div>

				</div>


				<%
					}
				%>

			</div>

			<!-- 小贴士 -->

			<div class="tips">

				<h2 class="mini-title"><%=cookbook.getTitle()%>的烹饪技巧
				</h2>

				<p><%=cookbook.getTips()%></p>

			</div>

			<p class="creattime">
				创建时间:<%=cookbook.getInputTime()%></p>

			<div class="">
				©本菜谱的做法由 <a class="author"
					href="<%=path%>/PersonalServlet?action=init&id=<%=cookbook.getUserinfo().getId()%>"
					target="_blank" one-link-mark="yes"><%=cookbook.getUserinfo().getName()%></a>
				编写，未经授权不得转载



			</div>



			<div class="note clearfix">

				<a class="upnote-btn br4" style="margin-bottom: 35px;"
					href="<%=path%>/upWorks.jsp?cookbookId=<%=cookbook.getId()%>">上传我做的这道菜</a>

			</div>
			<!-- 面包屑导航 -->

			<p class="fcc text-lips" style="padding-top: 35px;">
				你当前的位置：<a href="https://www.douguo.com/" title="南瓜美食"
					one-link-mark="yes">南瓜美食</a> &gt; #
			</p>

			<!-- 评论 -->

			<div id="comment" class="comment">
				<a name="a1">
					<div id="comment-text">
						<h2 class="mini-title">评论</h2>
						<div class="in-comment clearfix">

							<%
								if (session.getAttribute("userinfo") == null) {
							%>
							<div class="author-img">
								<img class="br50" width="30" height="30"
									src="<%=path%>/static/image/nangua.jpg" alt="南瓜美食">
							</div>
							<p class="comm-txt left">
								发表评论，你需要 <a href="<%=path%>/login.jsp">登录</a> 或 <a
									href="<%=path%>/registe.jsp" target="_blank">注册</a>
							</p>
							<a href="javascript:;" class="comm-btn no-btn"
								one-link-mark="yes">发表评论</a>
							<%
								} else {
							%>
							<div class="author-img">
								<img class="br50" width="30" height="30"
									src="<%=path%>/static/image/<%=userinfo.getAvatar()%>"
									alt="<%=userinfo.getName()%>">
							</div>
							<textarea class="comm-txt left" id="commentContent"></textarea>
							<a href="javascript:;" class="comm-btn no-btn"
								one-link-mark="yes">发表评论</a>
							<%
								}
							%>
						</div>
					</div>
				</a>
				<ul id="comments">
					<%
						for (CookbookComment comment : firstComments)//循环的一级评论
					{
						this.showComment(comment, out, path);
					}
					%>
				</ul>
				<!-- 	<div id="page">
<div class="pages">
<a href="javascript:;" onclick="comments.getCommentList(0,10)"
class="atou hide" one-link-mark="yes">首页</a><a
href="javascript:;" onclick="comments.getCommentList(0,10)"
class="ali aon" one-link-mark="yes">1</a><a href="javascript:;"
onclick="comments.getCommentList(10,10)" class="ali"
one-link-mark="yes">2</a><a href="javascript:;"
onclick="comments.getCommentList(20,10)" class="ali"
one-link-mark="yes">3</a><a href="javascript:;"
onclick="comments.getCommentList(30,10)" class="ali"
one-link-mark="yes">4</a><a href="javascript:;"
onclick="comments.getCommentList(10,10)" class="anext"
one-link-mark="yes">下一页</a><a href="javascript:;"
onclick="comments.getCommentList(120,10)" class="alast"
one-link-mark="yes">末页</a>
</div>
</div>
 -->
			</div>
		</div>

		<div id="right">

			<div style="width: 280px; overflow: hidden; margin-bottom: 40px;">

				<script type="text/javascript"
					src="<%=path%>/static/cookbookShow_files/todpqnwuwrvpq.js.下载"></script>

			</div>

			<!-- 热门文章 -->

			<div style="width: 280px; overflow: hidden; margin-bottom: 40px;">

			</div>

			<img width="280" src="<%=path%>/static/image/chatu.jpg">
		</div>
		<div id="module">
			<!-- 模态框 -->
			<!-- <div class="smask"></div> -->
			<!-- 步骤图大图展示狂 -->
		<!--  	<div id="bigimg" class="fancbox relative">
				<div class="relative">
					<img class="stepimg"
						src="<%=path%>/static/cookbookShow_files/yuan_a19b73e30d7119e6f21ae5e36845435c.jpg"
						alt=""> <a href="javascript:;" class="bigimg-left"
						onclick="toleft(10)"
						onmouseover="javascript:$(&#39;.fancybox-left-ico&#39;).show();"
						onmouseout="javascript:$(&#39;.fancybox-left-ico&#39;).hide();"
						one-link-mark="yes"><span class="fancy-ico fancybox-left-ico"></span></a>

					<a href="javascript:;" class="bigimg-right" onclick="toright(10)"
						onmouseover="javascript:$(&#39;.fancybox-right-ico&#39;).show();"
						onmouseout="javascript:$(&#39;.fancybox-right-ico&#39;).hide();"
						one-link-mark="yes"><span class="fancy-ico fancybox-right-ico"></span></a>

					<p class="steptxt text-lips">
						<span></span> / 10
						<%=cookbook.getTitle()%>#每一道菜都是一台时光机#的做法步骤<span></span>
					</p>

					<a class="close-btn close" onclick="cmask();"
						href="javascript:void(0);" one-link-mark="yes"></a>

				</div>

			</div>-->

			<!-- 加入菜单弹窗 -->

			<div id="coll-box" class="fancbox br4 relative">

				<p class="title">收藏成功，选择加入的菜单</p>

				<img class="close"
					src="<%=path%>/static/cookbookShow_files/close.png" alt=""
					onclick="cmask()">

				<ul class="mlist"></ul>

				<div class="bot-btn">

					<!-- <a class="create-btn" href="javascript:void(0)" onclick="createmenu()">创建一个新菜单</a> -->

					<a id="save-btn" class="save-btn" href="javascript:;"
						onclick="insertMenu(1605903,&#39;71qu9NFO7Ucz9Q3856CNcphLCYAEnrLUOys4qvIk&#39;)"
						one-link-mark="yes">保存</a>

				</div>

				<img class="menucover"
					src="<%=path%>/static/cookbookShow_files/220_a19b73e30d7119e6f21ae5e36845435c.jpg"
					alt="">

			</div>

			<div id="create_menu" class="fancbox br4 relative">

				<h2 class="title">创建菜单</h2>

				<p>

					标题： <input type="text" id="menutitle" style=""> <span
						id="ttip"></span>

				</p>

				<p>

					内容：

					<textarea id="menudesc"></textarea>

					<span id="tcon"></span>

				</p>

				<a id="save-menu" class="save-btn" href="javascript:void(0);"
					onclick="insertMenuData(1605903,&#39;71qu9NFO7Ucz9Q3856CNcphLCYAEnrLUOys4qvIk&#39;)"
					style="" one-link-mark="yes">保存</a> <img class="close-creat"
					onclick="cmask();"
					src="<%=path%>/static/cookbookShow_files/close.png" alt="">

			</div>

		</div>

	</div>



	<jsp:include page="/inc/foot.jsp"></jsp:include>

	</div>

	<script src="<%=path%>/static/cookbookShow_files/recipe.js.下载"></script>

	<script src="<%=path%>/static/cookbookShow_files/tip.js.下载"></script>

	<script src="<%=path%>/static/cookbookShow_files/search.js.下载"></script>

	<script src="<%=path%>/static/cookbookShow_files/main.js.下载"></script>

	<!-- <script src='https://s13.cnzz.com/c.php?id=30029854' language='JavaScript' charset='gb2312'></script> -->



	<script src="<%=path%>/static/cookbookShow_files/comment.js.下载"></script>

	<script src="<%=path%>/static/cookbookShow_files/page.js.下载"></script>

	<script>

    $(function(){
    	if(<%=session.getAttribute("userinfo") != null%>){
        	$.ajax({
        	url:"<%=path%>/CookbookCollectServlet",
        	data:{action:"judgeCollection",cookbookId:"<%=cookbook.getId()%>"},
        	success:function(msg){
        	if(msg=="true"){
        	$(".btn-collect").html("已收藏");
        	}
        	else{
        	$(".btn-collect").html("收藏");
        	}
        	}
        	});
        	$(".btn-collect").click(function(){
        	var ht = $(this).html();
        	if(ht=="已收藏"){
        	if(!window.confirm("确认取消收藏？")){
        	return;
        	}
        	$.ajax({
        	    	url:"<%=path%>/CookbookCollectServlet",
        	    	data:{action:"cancelCollection",cookbookId:"<%=cookbook.getId()%>"}
        	    	});
        	$(".btn-collect").html("收藏");
        	}
        	else{
        	$.ajax({
        	    	url:"<%=path%>/CookbookCollectServlet",
        	    	data:{action:"addCollection",cookbookId:"<%=cookbook.getId()%>"}
        	    	});
        	$(".btn-collect").html("已收藏");
        	}
        	});
        	$.ajax({
        	url:"<%=path%>/AttentionServlet",
        	data:{action:"judgeAttention",authorId:"<%=cookbook.getUserinfo().getId()%>"},
        	success:function(msg){
        	if(msg=="true"){
        	$(".addicon").text("已");
        	}
        	else{
        	$(".addicon").text("+");
        	}
        	}
        	});
        	$(".gz").click(function(){
        	if($(".addicon").text()=="+"){
        	$.ajax({
        	url:"<%=path%>/AttentionServlet",
        	data:{action:"addAttention",authorId:"<%=cookbook.getUserinfo().getId()%>"}
        	});
        	$(".addicon").text("已");
        	}
        	else{
        	if(!window.confirm("确定取消关注？")){
        	return;
        	}
        	$.ajax({
        	url:"<%=path%>/AttentionServlet",
        	data:{action:"cancelAttention",authorId:"<%=cookbook.getUserinfo().getId()%>"}
        	});
        	$(".addicon").text("+");
        	}
        	});
        	var UID = 0;
        	$(".reply-btn").click(function(){
        	UID = $(this).attr("UID");
        	});
        	
        	$(".comm-btn").click(function(){
        	if($("#commentContent").val()==""){
        	alert("请正确输入。")
        	}
       	else{
        	var content = $("#commentContent").val();
        	$.ajax({
        	url:"<%=path%>/CommentServlet",
        	async:false,
        	data:{action:"cookbookPostComment",content:content,cookbookId:"<%=cookbook.getId()%>",UID:UID},
        	success:function(msg){
        	window.location.href="<%=path%>/CookbookServlet?action=cookbookShow&id=<%=cookbook.getId()%>";
        	}
        	});
        	}
        	});
        }
    	else{
        	$(".btn-collect").click(function(){
        	$.ajax({
    	    	url:"<%=path%>/CookbookCollectServlet",
    	    	data:{action:"addCollection",cookbookId:"<%=cookbook.getId()%>"},
    	    	success:function(msg){
    	    	if("no"==msg){
    	    	window.location.href="<%=path%>/login.jsp";
    	    	}
    	    	}
    	    	});
        	});
        	$(".gz").click(function(){
        	$.ajax({
        	url:"<%=path%>/AttentionServlet",
        	data:{action:"addAttention",authorId:"<%=cookbook.getUserinfo().getId()%>"},
        	success:function(msg){
        	if("no"==msg){
        	window.location.href="<%=path%>/login.jsp";
        	}
        	}
        	});
        	});
        	$(".no-btn").click(function(){
        	if(confirm("登录才可以发表评论")){
        	window.location.href="<%=path%>/login.jsp";
        	return;
        	}
        	});
        }
    })
</script>



</body>
</html>
<!-- 举报弹窗 -->
<style>
.modal1 {
    display: none; /* 默认隐藏 */
    position: fixed; /* 固定定位 */
    z-index: 1; /* 设置在顶层 */
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%;
    overflow: auto; 
    background-color: rgb(0,0,0); 
    background-color: rgba(0,0,0,0.4); 
}
  
/* 弹窗内容 */
.modal-content1 {
    background-color: #fefefe;
    margin: 15% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 20%; 
}
  
/* 关闭按钮 */
.close1 {
    color: #fff;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
  
.close1:hover,
.close1:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
</style>
<!-- 弹窗 -->
<div id="myModal1" class="modal1">
  
  <!-- 弹窗内容 -->
  <div class="modal-content1">
    <span class="close1">&times;</span>
    <label for="">举报理由</label>
    <select class="liyou1">
    <option value="1">暴力</option>
    <option value="2">色情</option>
    <option value="3">广告</option>
    <option value="4">诈骗</option>
    <option value="5">其他</option>
    </select>
    <button class="sure1">確定</button>
    <button class="cancel1">取消</button>
  </div>
  
</div>
<script>
// 获取弹窗
var modal1 = document.getElementById('myModal1');
  
// 打开弹窗的按钮对象
/* var btn1 = $(".reply-bt"); */
  
// 获取 <span> 元素，用于关闭弹窗
var span1 = document.querySelector('.close1');
 
//获取 確定 按鈕
var sure1 = document.querySelector('.sure1');
 
//获取 取消 按鈕
var cancel1 = document.querySelector('.cancel1');
  
// 点击按钮打开弹窗
/* $(btn1).onclick = function() {
    modal1.style.display = "block";
} */
var pp = $(".reply-bt");

  
// 点击 <span> (x), 关闭弹窗
span1.onclick = function() {
    modal1.style.display = "none";
}
  
// 在用户点击其他地方时，关闭弹窗
window.onclick = function(event) {
    if (event.target == modal1) {
        modal1.style.display = "none";
    }
}

$(function(){
	pp.click(function(){
		$("#myModal1").css("display","block");
		var th = $(this);
		var ok =$(sure1);
		ok.click(function(){
		var val = $(".liyou1").val();
		if(<%=userinfo==null%>){
			location.href="<%=path%>/login.jsp";
		}else{
			var commentId =th.data("id");
			var mu=th.val();
			if(mu=="举报"){	
				$.ajax({
					url:"<%=path%>/CookbookCommentReportServlet?action=cookbookCommentReport",
					data:{commentId:commentId,val:val},
					success:function(){
						th.val("已举报");
						modal1.style.display = "none";
						th.prop("disabled","true");
					}
				})
			}
		}
	})
});
})
 
 
// 在用户点击取消按鈕
cancel1.onclick = function(event) {
  modal1.style.display = "none";
}
$(function(){
	$(".reply-bt").each(function(){
		 var id=$(this).data("id");
		 var th =$(this);
		 $.ajax({
			 url:"<%=path%>/CookbookCommentReportServlet?action=isReprot",
			 data:{id:id},
			 success:function(mes){
				 if(mes=="ok"){
					 th.val("已举报");
					 th.prop("disabled","true"); 
				 }
			 }
		 })
	 })
})
</script>  
<!-- 弹窗结束 -->